home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / nano / ruby.nanorc < prev    next >
Encoding:
Text File  |  2010-04-15  |  1.4 KB  |  32 lines

  1. ## Here is an example for Ruby.
  2. ##
  3. syntax "ruby" "\.rb$"
  4. header "^#!.*/ruby[-0-9._]*"
  5. ## Asciibetical list of reserved words
  6. color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
  7. ## Constants
  8. color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
  9. ## Ruby "symbols"
  10. icolor magenta "([     ]|^):[0-9A-Z_]+\>"
  11. ## Some unique things we want to stand out
  12. color brightyellow "\<(__FILE__|__LINE__)\>"
  13. ## Regular expressions
  14. color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
  15. ## Shell command expansion is in `backticks` or like %x{this}.  These are
  16. ## "double-quotish" (to use a perlism).
  17. color brightblue "`[^`]*`" "%x\{[^}]*\}"
  18. ## Strings, double-quoted
  19. color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
  20. ## Expression substitution.  These go inside double-quoted strings,
  21. ## "like #{this}".
  22. color brightgreen "#\{[^}]*\}"
  23. ## Strings, single-quoted
  24. color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
  25. ## Comments
  26. color cyan "#[^{].*$" "#$"
  27. color brightcyan "##[^{].*$" "##$"
  28. ## "Here" docs
  29. color green start="<<-?'?EOT'?" end="^EOT"
  30. ## Some common markers
  31. color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
  32.